<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<!DOCTYPE html>
<html>
<header>

<%String path =  request.getContextPath();%> 
</header>
<body>
<div class="navbar">
	<div class="navbar-inner">
		<a class="brand" href="<%=path%>">FlySky</a>
		<ul class="nav">
			<li><a href="<%=path%>">首页</a></li>
			<li><a href="undo.htm">记事</a></li>
			<li><a href="undo.htm">相册</a></li>
			<li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown">财务</a>
				<ul class="dropdown-menu">
					<li>
					<a href="<%=path%>/financeInput.htm">
						个人记账
					</a>
					</li>
					<li>
					<a href="<%=path%>/viewFinance.htm">
						账本查看
					</a>
					</li>
					<li>
					<a href="<%=path%>/typeManager.htm">
						类目管理
					</a>
					</li>
				</ul>
			</li>
			<li><a href="undo.htm">同学录</a></li>
		</ul>
		<c:if test="${sessionScope.user == null }">
			<span class="loginLink">
			<a href="registerUser.html">注册</a>
			</span>
			<span class="loginLink">
			<a href="login.html">登录</a>
			</span>
		</c:if>
		<c:if test="${sessionScope.user != null}">
			<div class="btn-group pull-right">
			  <button class="btn">${user.name}</button>
			  <button class="btn dropdown-toggle" data-toggle="dropdown">
			    <span class="caret"></span>
			  </button>
			  <ul class="dropdown-menu">
			    <li><a href="#">个人设置</a></li>
			    <li class="divider"></li>
			    <li><a href="logout.htm">退出</a></li>
			  </ul>
			</div>
		</c:if>
	</div>
</div>
</body>
</html>